# -*- coding=utf-8
import requests
import sys
import logging
from common import presignedUrl

# 正常情况日志级别使用INFO，需要定位时可以修改为DEBUG，此时SDK会打印和服务端的通信信息
logging.basicConfig(level=logging.INFO, stream=sys.stdout)


def getVideo(video_key):
    # url = presignedUrl.getPresignedUrl('videos/19e0ba13-908b-4baf-acaf-c2c029238b20.mp4', 'GET', {})
    key = str(video_key)
    url = presignedUrl.getPresignedUrl(key, "GET", {})
    # 使用URL
    # response = requests.get(url=url)
    return url
